package exception._5_20;

import java.io.FileOutputStream;

public class IOException {
    public static void main(String[] args) {
        FileOutputStream fos=null;
        try {
             fos=new FileOutputStream("fos1.dat");
            fos.write(1);
            fos.close();
        } catch (java.io.IOException e) {
            System.out.println("出错了!");
        } finally {
            try{
                if(fos!=null)
                    fos.close();
            }
            catch(java.io.IOException e){
                System.out.println("关闭出错!");
            }
        }
    }
}
